import request from '@/utils/request'

// 查询商家列表
export function listMerchant(query) {
    return request({
        url: '/system/merchant/list',
        method: 'get',
        params: query
    })
}

// 查询商家详细
export function getMerchant(id) {
    return request({
        url: '/system/merchant/' + id,
        method: 'get'
    })
}

// 新增商家
export function addMerchant(data) {
    return request({
        url: '/system/merchant',
        method: 'post',
        data: data
    })
}

// 修改商家
export function updateMerchant(data) {
    return request({
        url: '/system/merchant',
        method: 'put',
        data: data
    })
}

// 删除商家
export function delMerchant(id) {
    return request({
        url: '/system/merchant/' + id,
        method: 'delete'
    })
}
